<?php
/**
 * 信息控制器
 * Date: 2025/11/05
 */

namespace App\Http\Controllers\Pc;

use App\Http\Controllers\BaseController;
use App\Services\Pc\InfoService;
use Illuminate\Http\Request;

class InfoController extends BaseController
{
    /**
     * 基础信息
     * @date 2025/11/05
     * @return \Illuminate\Http\JsonResponse
     */
    public function index()
    {
        return (new InfoService())->index();
    }

    /**
     * 搜索列表
     * @date 2025/11/13
     * @return \Illuminate\Http\JsonResponse
     */
    public function search(Request $request)
    {
        $params = $this->validate($request, [
            'keywords' => 'sometimes',
            'size' => 'sometimes'
        ]);
        return (new InfoService())->search($params);
    }
}
